<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/admin/include/init_admin.jsp" %>
<%

	String call_number 		= StringUtil.nvl(request.getParameter("call_number"));

	String title			= "";
	if ("".equals(call_number)) {
		title = "고객정보";
	} else {
		title = "전화수신";
	}

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title><%= SYSTEM_NAME %></title>
	<%@ include file="/admin/include/cssnjs.jsp"  %>

	<script type="text/javascript">
	
	
	
	$(document).ready(function() {
		var customerList = window.dialogArguments;
		
		var layerHtml = '';
		for (var i = 0; i < customerList.length; i++) {
			layerHtml += '<tr><td class="blx"><a href="#nohref">' + customerList[i].customer_name + '</a></td>'
					+ '<td>' + customerList[i].birth_date + '</td>'
					+ '<td>' + customerList[i].tel_no + '</td>'
					+ '<td>' + customerList[i].hp_no + '</td>'
					+ '<td class="brx">' + customerList[i].address + '</td>'
					+ '</tr>';
		}
		$('#list').html(layerHtml);
		
		$('#list').find('tr').hover(
				function () { $(this).addClass("hover"); }
			  , function () { $(this).removeClass("hover"); }
			)
			.click(function(){
				window.returnValue = customerList[$(this).index()];
				window.close();
			});
		$('a').on('focusin', function() {
			$(this).closest('tr').addClass("hover");
		}).on('focusout', function() {
			$(this).closest('tr').removeClass("hover");
		});
	});



	</script>
</head>
<body>
<div id="wrap">
		<div id="popup">
			<div class="menu_title">
				<h1><%=title %></h1>
				<div class="r mt2">
					<input type="image" class="button" src="../images/btn_close.gif" onclick="self.close()"/>
				</div>
			</div>
			<div class="clear line_01"></div>
			
	<%	if (!"".equals(call_number)) { %>
			<div id="call_number">
				수신번호 : <%= call_number %>
			</div>
	<%	} %>

			<table cellpadding="0" cellspacing="0" class="table_01 mt5">
			<colgroup>
				<col width="80px"/>
				<col width="80px"/>
				<col width="100px"/>
				<col width="100px"/>
				<col />
			</colgroup>
			<thead>
				<tr> 
					<th><p>이름</p></th>
					<th><p>생년월일</p></th>
					<th><p>전화번호</p></th>
					<th><p>핸드폰</p></th> 
					<th><p>주소</p></th> 
				</tr>
			</thead>
			</table>
			
			<div class="box" style="height:<%= "".equals(call_number) ? "300" : "260" %>px;">
				<table cellpadding="0" cellspacing="0" class="blx">
				<colgroup>
					<col width="79px"/>
					<col width="80px"/>
					<col width="100px"/>
					<col width="100px"/>
					<col />
				</colgroup>
				<tbody id="list">
		
				</tbody>
				</table>
			</div>
		</div>
		
</div>



</body>
</html>
